home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / dde1 / main.frm < prev    next >
Text File  |  1993-05-26  |  17KB  |  597 lines

  1. VERSION 2.00
  2. Begin Form frmMain 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "DDE Experimenter"
  5.    FontTransparent =   0   'False
  6.    Height          =   5745
  7.    Left            =   930
  8.    LinkMode        =   1  'Source
  9.    LinkTopic       =   "System"
  10.    ScaleHeight     =   5340
  11.    ScaleWidth      =   6210
  12.    Top             =   1125
  13.    Width           =   6330
  14.    Begin Frame Frames 
  15.       Caption         =   "Destination Data"
  16.       Height          =   3015
  17.       Index           =   2
  18.       Left            =   120
  19.       TabIndex        =   21
  20.       Top             =   2280
  21.       Width           =   6015
  22.       Begin TextBox txtData 
  23.          Height          =   2160
  24.          Left            =   120
  25.          MultiLine       =   -1  'True
  26.          ScrollBars      =   3  'Both
  27.          TabIndex        =   22
  28.          Text            =   "Text1"
  29.          Top             =   720
  30.          Width           =   5760
  31.       End
  32.       Begin OptionButton optDataType 
  33.          Caption         =   "Graphics"
  34.          Height          =   255
  35.          Index           =   1
  36.          Left            =   1440
  37.          TabIndex        =   14
  38.          Top             =   360
  39.          Width           =   1815
  40.       End
  41.       Begin OptionButton optDataType 
  42.          Caption         =   "Text"
  43.          Height          =   255
  44.          Index           =   0
  45.          Left            =   120
  46.          TabIndex        =   13
  47.          Top             =   360
  48.          Value           =   -1  'True
  49.          Width           =   1095
  50.       End
  51.       Begin PictureBox picData 
  52.          AutoRedraw      =   -1  'True
  53.          DrawWidth       =   2
  54.          Height          =   2160
  55.          Left            =   120
  56.          ScaleHeight     =   2130
  57.          ScaleWidth      =   5730
  58.          TabIndex        =   23
  59.          Top             =   720
  60.          Visible         =   0   'False
  61.          Width           =   5760
  62.       End
  63.    End
  64.    Begin Frame Frames 
  65.       Caption         =   "Source Properties"
  66.       Height          =   1440
  67.       Index           =   1
  68.       Left            =   4200
  69.       TabIndex        =   20
  70.       Top             =   720
  71.       Width           =   1920
  72.       Begin TextBox txtSourceTopic 
  73.          Height          =   285
  74.          Left            =   120
  75.          TabIndex        =   17
  76.          Text            =   "System"
  77.          Top             =   960
  78.          Width           =   1695
  79.       End
  80.       Begin CheckBox chkSourceMode 
  81.          Caption         =   "&Source Enabled"
  82.          Height          =   240
  83.          Left            =   120
  84.          TabIndex        =   15
  85.          Top             =   360
  86.          Value           =   1  'Checked
  87.          Width           =   1680
  88.       End
  89.       Begin Label Labels 
  90.          Caption         =   "Source &Link Topic"
  91.          Height          =   240
  92.          Index           =   3
  93.          Left            =   120
  94.          TabIndex        =   16
  95.          Top             =   720
  96.          Width           =   1680
  97.       End
  98.    End
  99.    Begin CommandButton cmdExit 
  100.       Caption         =   "E&xit"
  101.       Height          =   480
  102.       Left            =   4200
  103.       TabIndex        =   18
  104.       Top             =   120
  105.       Width           =   1920
  106.    End
  107.    Begin Frame Frames 
  108.       Caption         =   "Destination Properties"
  109.       Height          =   2160
  110.       Index           =   0
  111.       Left            =   120
  112.       TabIndex        =   19
  113.       Top             =   0
  114.       Width           =   3960
  115.       Begin ComboBox cboAppName 
  116.          Height          =   300
  117.          Left            =   1200
  118.          TabIndex        =   1
  119.          Text            =   "ProgMan"
  120.          Top             =   360
  121.          Width           =   1215
  122.       End
  123.       Begin ComboBox cboTopic 
  124.          Height          =   300
  125.          Left            =   720
  126.          TabIndex        =   3
  127.          Text            =   "ProgMan"
  128.          Top             =   720
  129.          Width           =   1695
  130.       End
  131.       Begin ComboBox cboItem 
  132.          Height          =   300
  133.          Left            =   720
  134.          TabIndex        =   5
  135.          Top             =   1080
  136.          Width           =   1695
  137.       End
  138.       Begin OptionButton optLinkMode 
  139.          Caption         =   "&Notify"
  140.          Height          =   240
  141.          Index           =   3
  142.          Left            =   2640
  143.          TabIndex        =   8
  144.          Top             =   1200
  145.          Width           =   960
  146.       End
  147.       Begin CommandButton cmdExecute 
  148.          Caption         =   "&Execute"
  149.          Enabled         =   0   'False
  150.          Height          =   480
  151.          Left            =   2640
  152.          TabIndex        =   12
  153.          Top             =   1560
  154.          Width           =   1080
  155.       End
  156.       Begin CommandButton cmdPoke 
  157.          Caption         =   "&Poke"
  158.          Enabled         =   0   'False
  159.          Height          =   480
  160.          Left            =   1440
  161.          TabIndex        =   11
  162.          Top             =   1560
  163.          Width           =   1080
  164.       End
  165.       Begin CommandButton cmdRequest 
  166.          Caption         =   "&Request"
  167.          Enabled         =   0   'False
  168.          Height          =   480
  169.          Left            =   240
  170.          TabIndex        =   10
  171.          Top             =   1560
  172.          Width           =   1080
  173.       End
  174.       Begin OptionButton optLinkMode 
  175.          Caption         =   "&Manual"
  176.          Height          =   240
  177.          Index           =   2
  178.          Left            =   2640
  179.          TabIndex        =   7
  180.          Top             =   960
  181.          Width           =   960
  182.       End
  183.       Begin OptionButton optLinkMode 
  184.          Caption         =   "A&utomatic"
  185.          Height          =   240
  186.          Index           =   1
  187.          Left            =   2640
  188.          TabIndex        =   6
  189.          Top             =   720
  190.          Width           =   1200
  191.       End
  192.       Begin CommandButton cmdConnect 
  193.          Caption         =   "&Connect"
  194.          Height          =   480
  195.          Left            =   2520
  196.          TabIndex        =   9
  197.          Top             =   240
  198.          Width           =   1320
  199.       End
  200.       Begin Label Labels 
  201.          Caption         =   "Item"
  202.          Height          =   255
  203.          Index           =   2
  204.          Left            =   120
  205.          TabIndex        =   4
  206.          Top             =   1080
  207.          Width           =   615
  208.       End
  209.       Begin Label Labels 
  210.          Caption         =   "&Topic"
  211.          Height          =   255
  212.          Index           =   1
  213.          Left            =   120
  214.          TabIndex        =   2
  215.          Top             =   720
  216.          Width           =   615
  217.       End
  218.       Begin Label Labels 
  219.          Caption         =   "&Application"
  220.          Height          =   255
  221.          Index           =   0
  222.          Left            =   120
  223.          TabIndex        =   0
  224.          Top             =   360
  225.          Width           =   975
  226.       End
  227.    End
  228.    Begin Label lblSysLink 
  229.       Height          =   375
  230.       Left            =   4440
  231.       TabIndex        =   25
  232.       Top             =   5400
  233.       Visible         =   0   'False
  234.       Width           =   1455
  235.    End
  236.    Begin Label Topics 
  237.       Height          =   375
  238.       Left            =   120
  239.       TabIndex        =   24
  240.       Top             =   5400
  241.       Visible         =   0   'False
  242.       Width           =   2175
  243.    End
  244. End
  245. Option Explicit
  246. Option Compare Text     ' Perform case-insensitive string comparisons
  247. Dim TopicChangeFlag As Integer, appChangeFlag As Integer, Connected As Integer
  248. Dim NotifyFlag As Integer
  249. Const DEST_TEXT = 0, DEST_PIC = 1
  250. Const MNU_COPY = 0, MNU_PASTE = 1, MNU_PASTELINK = 2
  251.  
  252. Sub cboAppName_Click ()
  253.     If Connected Then cmdConnect.Value = True
  254.     FillTopicList
  255. End Sub
  256.  
  257. Sub cboAppName_LostFocus ()
  258.     If appChangeFlag Then
  259.     appChangeFlag = False
  260.     If Connected Then cmdConnect.Valu